package edu.bbu.commonproject.desktop.gui.view.swing.file.traffic.utils;

import java.awt.BorderLayout;
import java.awt.Graphics;

import javax.swing.JLabel;
import javax.swing.JProgressBar;

/**
 * The progress label.
 */
public class ProgressLabel extends JProgressBar
{
	/** The label text. */
	private JLabel text;
	
	/**
	 * The constructor.
	 */
	public ProgressLabel()
	{
		text = new JLabel();
		text.setHorizontalAlignment(JLabel.CENTER);
		
		this.setLayout(new BorderLayout());
		this.add(text, BorderLayout.CENTER);
	}
	
	/**
	 * The constructor.
	 * @param string the label's text.
	 */
	public ProgressLabel(String string)
	{
		text = new JLabel(string);
		text.setHorizontalAlignment(JLabel.CENTER);
		
		this.setLayout(new BorderLayout());
		this.add(text, BorderLayout.CENTER);
	}
	
	/**
	 * It sets the text.
	 * @param text the text.
	 */
	public void setText(String text)
	{
		this.text.setText(text);
	}
	
	/**
	 * It gets the text.
	 * @return the text.
	 */
	public String getText()
	{
		return text.getText();
	}
	
	/**
	 * The overrided paint component.
	 */
	protected void paintComponent(Graphics g)
	{
		
	}
}
